package com.tjetc.dao;

import com.tjetc.domain.ChatHistory;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.HashSet;
import java.util.List;

public interface ChatHistoryMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ChatHistory record);

    int insertSelective(ChatHistory record);

    ChatHistory selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ChatHistory record);

    int updateByPrimaryKey(ChatHistory record);
@Select("select * from chat_history")
    List<ChatHistory> findAll();
    @Select("select * from chat_history where sender_id=#{senderId} and receiver_id=#{receiveId}")
    List<ChatHistory> findAllBysenderIdAndReceiverId(@Param("senderId") Integer senderId,@Param("receiveId") Integer receiveId);
@Select("select ")
    HashSet<Integer> findAllBySenderIdOrReceiverId(Integer userId, Integer userId1);
}